package com.mustafaiev.tair.autobase.web.command;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class OrderListCommandImpl implements AutobaseServletCommand {

    @Override
    public void processGet(HttpServletRequest req, HttpServletResponse resp)
            throws ServletException, IOException {
        
        if (req.getRequestURI().equals("/admin/orders.do")) {
            req.setAttribute("page", "order");
            req.getSession().getServletContext().getRequestDispatcher("/admin/index.jsp")
                    .forward(req, resp);
        } else {
            resp.sendRedirect("/admin.do");
        }
    }

    @Override
    public void processPost(HttpServletRequest req, HttpServletResponse resp)
            throws ServletException, IOException {

    }

}
